<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>

<h2 class="formHeader" id="searchFormHeader">Search the Database
	for Films</h2>

<form:form method="POST" commandName="advancedFilmSearchForm"
	action="/film_rental/films/search/advanced"
	cssClass="advancedSearchForm">
	<form:errors cssClass="errorHeader" />
	<table class="formTable">
		<tr class="formRow">
			<td class="formCell"><form:label path="searchString">Search Terms</form:label></td>
			<td class="formCell"><form:input path="searchString"
					cssClass="required" /></td>
			<td class="formCell"><form:errors path="searchString"
					cssClass="error" />
		</tr>
		<tr class="formRow">
			<td class="formCell"><form:label path="categoryId">Filter by Category</form:label></td>
			<td class="formCell"><form:select path="categoryId"
					items="${categoryMap}" /></td>
		</tr>
		<tr class="formRow">
			<td class="formCell"><form:label path="actorId">Filter by Actor</form:label></td>
			<td class="formCell"><form:select path="actorId"
					items="${actorMap}" /></td>
		</tr>
		<tr class="formRow">
			<td class="formCell"><form:label path="languageId">Filter by Language</form:label></td>
			<td class="formCell"><form:select path="languageId"
					items="${languageMap}" /></td>
		</tr>
		<tr class="formRow">
			<td class="formCell"><form:label path="originalLanguageId">Filter by Original Language</form:label></td>
			<td class="formCell"><form:select path="originalLanguageId"
					items="${languageMap}" /></td>
		</tr>
		<tr class="formRow">
			<td class="formCell"><form:label path="rating">Filter by Rating</form:label></td>
			<td class="formCell"><form:select path="rating"
					items="${ratingMap}" /></td>
		</tr>
		<tr class="formRow">
			<td class="formCell"><form:label path="runtime">Filter by Film Length</form:label></td>
			<td class="formCell"><form:select path="runtime"
					items="${runtimeMap}" /></td>
		</tr>
		<tr class="formRow">
			<td colspan="2" class="formCell"><input type="submit"
				value="Search" class="formButton" /></td>
		</tr>
	</table>
</form:form>